package com.tianji.learning.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tianji.api.dto.IdAndNumDTO;
import com.tianji.learning.domain.po.LearningRecord;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
* @author User
* @description 针对表【learning_record(学习记录表)】的数据库操作Mapper
* @createDate 2024-12-15 11:06:55
* @Entity com.tianji.learning.domain.po.LearningRecord
*/
public interface LearningRecordMapper extends BaseMapper<LearningRecord> {

	/**
	 * 查询当前用户本周计划中所有课程的已完成小节数量
	 *
	 * @param userId
	 * @return
	 */
	List<IdAndNumDTO> countLearnedSections(@Param("userId") Long userId, @Param("beginOfDay") LocalDateTime beginOfDay, @Param("endOfDay") LocalDateTime endOfDay);
}




